home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
serien
/
purity
/
nr.40
/
xsc
/
tasch.p
next >
Wrap
Text File
|
1994-12-10
|
2KB
|
86 lines
PROGRAM daschenreschner;
USES xsc;
VAR mem,operand,operand2:real;
operation:CHAR;
BEGIN
writeln(' Hallo ich bin Dein Dich liebender Daschenreschner!');
writeln('Sprech doch mal mit mir !');
write('Bitte Operand eingeben: ');read(operand);
operation:=' ';
mem:=0;
WHILE (operation<>'Q') DO BEGIN
writeln('Ergebnis: ',operand);
read(Operation);
Operation:=upcase(operation);
CASE operation OF
'E':BEGIN
operand:= exp(operand);
read(operation);
END;
'L':BEGIN
operand:= ln(operand);
read(operation);
END;
'C':BEGIN
operand:= cos(operand);
read(operation);
END;
'S':BEGIN
operand:= sin(operand);
read(operation);
END;
'T':BEGIN
operand:= tan(operand);
read(operation);
END;
'W':BEGIN
operand:= sqrt(operand);
read(operation);
END;
'M':BEGIN
mem:=operand;
read(operation);
END;
'R':BEGIN
operand:=mem;
read(operation);
END;
'Z': BEGIN
operand:=0;
writeln('Dajn Oparant ißt jedsd nuhl');
read(operation);
END;
'H': BEGIN
readln(operation);
operation:=upcase(operation);
CASE operation OF
'C':operand:= cosh(operand);
'S':operand:= sinh(operand);
'T':operand:= tanh(operand)
ELSE writeln('Du Trottel') END;
END;
'+': BEGIN
read(operand2);
operand:=operand+operand2;
END;
'-': BEGIN
read(operand2);
operand:=operand-operand2;
END;
'*': BEGIN
read(operand2);
operand:=operand*operand2;
END;
'/': BEGIN
read(operand2);
operand:=operand/operand2;
END
ELSE END;
END;
writeln('Auf Wiedersehn, es war so schöhn');
END.